<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bookmark Method</title>
    <link rel="icon" href="https://discord.com/assets/847541504914fd33810e70a0ea73177e.ico">
    <style>
      *, ::after, ::before {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        outline: 0;
      }
      html {
        font-family: sans-serif,system-ui;
      }
      body {
        background: url(https://discord.com/assets/fd91131ea693096d6be5e8aa99d18f9e.jpg) no-repeat center center fixed;
        background-size: 1920px 1080px;
      }
      .container {
        background:#36393f;
        width: 784px;
        box-shadow: 0 2px 10px 0 rgba(0,0,0,.2);
        border-radius: 5px;
        padding: 32px;
        font-size: 18px;
      }
      .wrapper {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        z-index: 1;
      }
      #logo {
        position: fixed;
        top: 24px;
        left: 24px;
        z-index:9999;
        text-decoration: none;
        display: flex;
        align-items: center;
      }
      .title {
        font-weight: 600;
        color:#fff;
        font-size: 24px;
        line-height: 30px;
        margin-bottom: 8px;
      }
      .secondarytitle {
        color:#b9bbbe;
        font-size: 16px;
        line-height: 20px;
        font-family: system-ui;
      }
      h5 {
        color: #8e9297;
        font-size: 12px;
        line-height: 16px;
        margin-bottom: 8px;
        font-weight: 600;
      }
      #generator {
        margin-top:20px;
        display:grid;
        grid-template-rows: 1fr 1fr;
        grid-gap: 20px;
      }
      input {
        padding: 10px;
        height: 40px;
        font-size: 16px;
        width: 100%;
        color:#b9bbbe;
        background-color: rgba(59,59,59,.3);
        border: 1px rgba(0,0,0,.3);
        background-color: rgba(0,0,0,0.1);
        border: 1px solid rgba(0,0,0,0.3);
        transition: border-color .2s ease-in-out;
        border-radius: 3px;
        font-family: system-ui;
      }
      input:hover {
        border-color: #040405;
      }
      input:focus {
        border-color: #0af;
      }
      button {
        background-color: rgb(88, 101, 242);
        font-size: 16px;
        line-height: 24px;
        width: 100%;
        height: 44px;
        border-radius: 3px;
        border:none;
        transition: background-color .17s ease,color .17s ease;
        cursor: pointer;
        color: #fff;
        font-family: sans-serif;
        font-weight: bold;
      }
      button:hover {
        background-color: rgb(71, 82, 196);
      }
      button:active {
        background-color: rgb(60, 69, 165);
      }
      svg {
        width: 32px;
        height: 32px;
        position: relative;
        float: right;
        fill: #fff;
        bottom:36px;
        right:8px;
        cursor: pointer;
      }
    </style>
</head>
<body>
  <a href="https://github.com/WiLuX-Source/Discord-Token-Login" id="logo" target="_blank" rel="noopener">
    <img src="https://raw.githubusercontent.com/WiLuX-Source/Discord-Token-Login/master/Resources/New_LogoNB.png" style="width: 319px;height: auto;-webkit-user-drag: none;">
    <span style="color: #009aff;font-weight: 600;">Made By WiLuX</span>
  </a>
  <div class="wrapper">
      <div class="container">
        <h3 class="title">Bookmark Generator</h3>
        <span class="secondarytitle">Please fill the required area & click "Generate Code" to get your code.</span>
        <div id="generator">
          <div style="height: 64px;">
            <h5>Account Token</h5>
            <input type="password" name="token" autocomplete="off" spellcheck="false" maxlength="69">
            <svg id="showhide" viewbox="0 0 16 16">
              <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>
              <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
              <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>
            </svg>
          </div>
          <div style="height: 64px;">
            <h5>Bookmark Code</h5>
            <input style="cursor: crosshair;" readonly type="text" name="bookmarkcode" autocomplete="off" spellcheck="false">
            <svg id="copytoclip" viewbox="0 0 16 16">
              <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
              <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
            </svg>
          </div>
          <button id="bookmark">Generate Code</button>
        </div>
      </div>
  </div> 
  <script>
    const showhidebtn = document.querySelector("#showhide")
    const copybtn = document.querySelector("#copytoclip")
    const tokeninput = document.querySelector("input[name=token]")
    const bookmarkinput = document.querySelector("input[name=bookmarkcode]")
    const generatebtn = document.querySelector("#bookmark")
    const bookmarkcode = 'javascript:function login(token) {setInterval(() => {document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`}, 50);setTimeout(() => {location.reload();}, 50);}'
    const bookmarkcode2 = "login('changehere');"
    let firstswitch = false
    showhidebtn.addEventListener('click', () => {
      showhidebtn.innerHTML = firstswitch ? '<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/> <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/> <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>' : '<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>'
      tokeninput.type = firstswitch ? "password" : "text"
      firstswitch = !firstswitch;
    })
    copybtn.addEventListener('click', () => {
      navigator.clipboard.writeText(bookmarkinput.value)
      copybtn.innerHTML = '<path fill-rule="evenodd" d="M10.854 7.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708 0z"/> <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/> <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>'
      setTimeout(() => {
        copybtn.innerHTML = '<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/> <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>'
      }, 2000);
    })
    generatebtn.addEventListener('click', () => {
      bookmarkinput.value = bookmarkcode + bookmarkcode2.replace('changehere',tokeninput.value)
      tokeninput.value = ''
    })
  </script>
</body>
</html>